docs: Mention gtk_main in the migration guide
authorMatthias Clasen <mclasen@redhat.com>
Mon, 10 Feb 2020 03:47:25 +0000 (22:47 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 10 Feb 2020 04:13:13 +0000 (23:13 -0500)
docs/reference/gtk/migrating-3to4.xml

index 9bb310534ba07dd3fbfb9f72624e4ddcf0db2133..e08d97f3162539ec26769ca41b0d338b099f0d8f 100644 (file)
       </para>
     </section>
 
+    <section>
+      <title>Stop using gtk_main() and related APIs</title>
+
+      <para>
+        GTK4 removes the gtk_main_ family of APIs. The recommended replacement
+        is GtkApplication, but you can also iterate the GLib mainloop directly,
+        using GMainContext APIs.
+      </para>
+      <para>
+        The replacement for gtk_events_pending() is g_main_context_pending(),
+        the replacement for gtk_main_iteration() is g_main_context_iteration().
+      </para>
+    </section>
   </section>
 
   <section>